<?php
    $demots_categories = View::get('d_categories');
?>
<div class="round left half">
    <div class="round-head">
    <h2>Dodaj nowy demotywator</h2>
    </div>
    
    <div class="round-content">

    <form action="index.php?controller=demot&action=save_admin" method="POST" class="uniForm"> 
            <fieldset class="inlineLabels">

                    <div class="ctrlHolder"> 
                            <label for="title">Tytuł</label> 
                            <input type="text" id="title" name="data[title]" value="" size="35" class="textInput"/> 
                    </div> 

                    <div class="ctrlHolder"> 
                            <label for="imgs">Obrazek</label> 
                            <input type="text" id="img" name="data[img]" value="" size="35" class="textInput"/>                          
                    </div> 
                
                    <div class="ctrlHolder"> 
                            <label for="cats">Kategoria</label> 
                            <select name="data[id_category]">
                                <?php foreach ($demots_categories as $d): ?>
                                <option value="<?php echo $d['id'] ?>"><?php echo $d['name']; ?></option>
                                <?php endforeach; ?>
                            </select>                            
                    </div> 
                
                    <div class="ctrlHolder"> 
                            <label for="email3">Status</label> 
                            <select name="data[id_statuses]">
                                <?php foreach (DStatus::getArray() as $k => $v): ?>
                                <option value="<?php echo $k ?>"><?php echo $v; ?></option>
                                <?php endforeach; ?>
                            </select>                            
                    </div> 

                    <div class="buttonHolder">  
                            <button type="submit" class="primaryAction">Save form</button> 
                    </div> 
            </fieldset> 
    </form> 

    </div>

</div>